<script setup lang="ts">
import { onMounted,onUnmounted } from 'vue'
import { useMainLogin } from '@/store/user'
import MarsMap from '@/components/mars-work/mars-map1.vue'
import Header from '@components/header/header.vue'
import Tabs from '@components/Tabs/index.vue'
import bus from '@/utils/eventBus'
import EVENTS from '@/utils/EVENTS'

const user = useMainLogin()
// 地图构造完成回调
const onMapload = async () => {
  await user.GetInfo()
  await user.GetBasicInfo()
}

onMounted(() => {

})

onUnmounted(() => {
  bus.off(EVENTS.SENDTOBROTHER);
});
</script>

<template>
  <div id="centerDiv" class="mapcontainer">
    <MarsMap @onload="onMapload" />
    <Header></Header>
    <Tabs></Tabs>
  </div>
</template>

<style scoped></style>
